package com.ktjiaotu.action.action01;

import com.ktjiaotu.action.action01.service.LogService;
import com.ktjiaotu.action.action01.service.LogServiceImpl;

import java.lang.reflect.Proxy;

/**
 * @Author: DABINGCHNEGJIAO
 * @CreateTime: 2025-06-06
 * @Description:
 * @Version: 1.0
 */
public class LoginTest {
    public static void main(String[] args) {
        LogService logService = new LogServiceImpl();

        LogService proxyInstance = (LogService) Proxy.newProxyInstance(logService.getClass().getClassLoader(),
                logService.getClass().getInterfaces(), new LoggingInvocationHandler(logService));

        proxyInstance.testMethod1();
        proxyInstance.testMethod2();
        proxyInstance.testMethod3();
    }
}
